package com.lyn.file;

import android.graphics.Bitmap;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;

/**
 * 文件夹IO操作
 *
 * @author Lyn 2022/12/18
 * @version 1.0.0
 */
public interface Folder {

    String getPath();

    String saveFile(File file);

    String saveFile(File file, int contentLength, ProgressListener listener);

    String saveFile(InputStream in, String fileName);

    String saveTxt(String text);

    String saveTxt(String text,String fileName);

    String saveTxt(String text,String fileName,boolean append);

    String readTxt(String fileName);

    String saveBitmap(Bitmap bitmap);

    String saveBitmap(Bitmap bitmap,int quality);

    String saveBitmap(Bitmap bitmap, String fileName);

    String saveBitmap(Bitmap bitmap, int quality ,String fileName);

    String saveFile(InputStream in, String fileName, long contentLength, ProgressListener listener);

    boolean deleteFile(String fileName);

    File getFile(String fileName);

    File[] getFiles();

    boolean deleteAllFile();

    FileInputStream getFileInputStream(String fileName);
}
